package com.dc.customview.touch;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.widget.RelativeLayout;

public class MyViewGroup extends RelativeLayout {

    public MyViewGroup(Context context) {
        super(context);
    }

    public MyViewGroup(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MyViewGroup(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        return super.dispatchTouchEvent(ev);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        return super.onInterceptTouchEvent(ev);
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        switch (event.getAction()) {
            case MotionEvent.ACTION_DOWN:
                Log.e("TAG","======MyViewGroup onTouchEvent ACTION_DOWN========");
                break;
            case MotionEvent.ACTION_MOVE:
                Log.e("TAG","++++++++MyViewGroup onTouchEvent ACTION_MOVE++++++++");
                break;
            case MotionEvent.ACTION_UP:
                Log.e("TAG","--------MyViewGroup onTouchEvent ACTION_UP--------");
                break;
            default:
                break;
        }
        return super.onTouchEvent(event);
    }
}
